﻿<UserControl x:Class="MvcXamlController.Controls.ChartControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:DV="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
              xmlns:DVC="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<UserControl.Resources>
		
		<Style x:Key="LineDataPointStyle1" TargetType="{x:Type DVC:LineDataPoint}">
			<Setter Property="Background" Value="Orange"/>
			<Setter Property="BorderBrush" Value="Gray"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="Width" Value="8"/>
			<Setter Property="Height" Value="8"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type DVC:LineDataPoint}">
						<Grid x:Name="Root" Opacity="0">
							<Grid.ToolTip>
								<ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
							</Grid.ToolTip>
							<Ellipse Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}"/>
							<Ellipse RenderTransformOrigin="0.661,0.321">
								<Ellipse.Fill>
									<RadialGradientBrush GradientOrigin="0.681,0.308">
										<GradientStop Color="Transparent"/>
										<GradientStop Color="#FF3D3A3A" Offset="1"/>
									</RadialGradientBrush>
								</Ellipse.Fill>
							</Ellipse>
							<Ellipse x:Name="SelectionHighlight" Fill="Red" Opacity="0"/>
							<Ellipse x:Name="MouseOverHighlight" Fill="White" Opacity="0"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
	</UserControl.Resources>
    <Grid>
        <DVC:Chart Canvas.Left="10" Name="mcChart"
           Background="LightSteelBlue">
            <DVC:Chart.Series>
                <DVC:LineSeries x:Name="lst" Title="Dots" ItemsSource="{Binding List}"
            IndependentValueBinding="{Binding Path=Name}"
            DependentValueBinding="{Binding Path=SalesNo}" DataPointStyle="{DynamicResource LineDataPointStyle1}" >
                </DVC:LineSeries>
            </DVC:Chart.Series>
        </DVC:Chart>
    </Grid>
</UserControl>
